package com.timothy.answer;

import java.util.ArrayList;
import java.util.List;
import com.timothy.service.MessageSenderUtil;

public class GradingAnswer extends BaseAnswer{
	private List<Integer> scoreList = new ArrayList<Integer>();
	
	public List<Integer> getAnswerList() {
		return scoreList;
	}

	public void setAnswerList(List<Integer> answerList) {
		this.scoreList = answerList;
	}

	@Override
	public String getAnswerContent() {
		StringBuffer sb = new StringBuffer();
		for( Integer value : scoreList )
			sb.append( "<Value>" ).append( value ).append( "</Value>" );
		return sb.toString();
	}

	@Override
	public String toMessage() {
		int slide = getQuestion().getSlideIndex();
		return String.format( MessageSenderUtil.Multi_Select_Answer, slide, getAnswerContent() );
	}

}
